home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / u_man / cat6 / newton.z / newton
Encoding:
Text File  |  2000-10-16  |  16.3 KB  |  331 lines

  1.  
  2.  
  3.  
  4. NNNNEEEEWWWWTTTTOOOONNNN((((6666DDDD))))                                                          NNNNEEEEWWWWTTTTOOOONNNN((((6666DDDD))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      newton - a physical modeling demo
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      nnnneeeewwwwttttoooonnnn [----ffff model_catalog] [----DDDD]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _N_e_w_t_o_n is a real-time simulation of an elastic body.  Command-line
  16.      arguments will be discussed below, after a general explanation of the
  17.      program.
  18.  
  19.      The body is made up of a number of _a_t_o_m_s and _s_p_r_i_n_g_s.  _A_t_o_m_s are points
  20.      of mass for which the forces of gravity apply.  Between some pairs of
  21.      atoms, there are _s_p_r_i_n_g_s, which supply additional forces if their current
  22.      length is different from their initial length.  The specific spring
  23.      equation used is not linear, but behaves close to linear in a narrow
  24.      vicinity of the initial spring length.
  25.  
  26.      The main window of _N_e_w_t_o_n shows a cubic room that contains the elastic
  27.      model at its center.  To drop the model, press and release the _l_e_f_t mouse
  28.      button.  Between the time you press the left mouse button and the time
  29.      you release it, you get a chance to reorient the model any way you want -
  30.      just move the mouse around and the model will turn in that direction.
  31.      Independently, you may wish to rotate the room.  This can be achieved by
  32.      pressing the _m_i_d_d_l_e mouse button and moving the mouse around.  To stop
  33.      reorienting the room, let go of the middle mouse button.
  34.  
  35.      Whenever you want to re-drop the model, hit the left mouse button.  As
  36.      before, you get a chance to reorient the model prior to dropping it (you
  37.      drop it by releasing the left mouse button).
  38.  
  39.      MMMMEEEENNNNUUUUSSSS
  40.  
  41.      As usual with the _G_L demo programs, the _r_i_g_h_t mouse button is the menu
  42.      button.  Several menu selections are available:
  43.  
  44.      mmmmooooddddeeeellllssss       There are a number of different models to select from, and a
  45.                   different shape can be selected via the model catalog menu.
  46.  
  47.      pppphhhhyyyyssssiiiiccccssss      The simulation is controlled by several physical parameters,
  48.                   and they can all be changed by the user.  For example, if
  49.                   the user wants to increase the gravity (essentially, make
  50.                   the model heavier), all she has to do is select ``gravity''
  51.                   in the ``physics'' submenu, and a gravity slider will pop
  52.                   up.  See the section on sliders below to find out what
  53.                   physical parameters are available, and how to use the
  54.                   sliders.
  55.  
  56.      mmmmooooddddeeeellll ddddiiiissssppppllllaaaayyyy
  57.                   The model can be displayed in several fashions:
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. NNNNEEEEWWWWTTTTOOOONNNN((((6666DDDD))))                                                          NNNNEEEEWWWWTTTTOOOONNNN((((6666DDDD))))
  71.  
  72.  
  73.  
  74.                   _s_m_o_o_t_h _s_u_r_f_a_c_e_s
  75.                                 Display the model as a single surface, using
  76.                                 the lighting model to obscure the corners of
  77.                                 the body;
  78.  
  79.                   _f_l_a_t _s_u_r_f_a_c_e_s The normal display mode for most models.
  80.                                 Every surface is lit independently;
  81.  
  82.                   _s_p_r_i_n_g_s       Display the internal connections between the
  83.                                 ``atoms'' of the model;
  84.  
  85.                   _B_e_r_m_u_d_a       This is a weird display mode using the color
  86.                                 map, try it!
  87.  
  88.                   NOTE: Only one of the above four is possible at any given
  89.                   time, so if you are tired of the _B_e_r_m_u_d_a display mode, the
  90.                   way to return to a more normal display mode is to simply
  91.                   select _f_l_a_t _s_u_r_f_a_c_e_s, _s_m_o_o_t_h _s_u_r_f_a_c_e_s, or _s_p_r_i_n_g_s from this
  92.                   submenu.
  93.  
  94.                   _t_o_g_g_l_e _t_r_a_n_s_l_u_c_e_n_c_y
  95.                                 The model can be made either opaque or
  96.                                 transparent.  Consecutive selections of this
  97.                                 menu item toggle between these two
  98.                                 possibilities.
  99.  
  100.                   _t_o_g_g_l_e _s_u_r_f_a_c_e_s+_s_p_r_i_n_g_s
  101.                                 It is sometimes helpful to see both the
  102.                                 surfaces and the springs of the model at the
  103.                                 same time.  If you have selected either _f_l_a_t
  104.                                 or _s_m_o_o_t_h surfaces, and you want to
  105.                                 superimpose the springs, click this menu item.
  106.                                 Clicking it again cancels the springs.  This
  107.                                 is particularly useful if the model is made
  108.                                 transparent, using the previous menu item.
  109.  
  110.      rrrroooooooommmm ddddiiiissssppppllllaaaayyyy This controls the way the room itself is drawn.  Selections
  111.                   are either _l_i_g_h_t_e_d _w_a_l_l_s _w/ _s_h_a_d_o_w_s, which means the walls
  112.                   are lit (just like the model itself,) and the model casts
  113.                   shadows on them; _l_i_g_h_t_e_d _w_a_l_l_s _w/_o _s_h_a_d_o_w_s, which is faster
  114.                   (since there are less polygons that need to be drawn); and
  115.                   _p_i_n_b_a_l_l _w_a_l_l_s , which are non-lit walls, but rather walls
  116.                   that light up whenever the model hits them (the color
  117.                   represents the amount of displacement).
  118.  
  119.      ssssppppiiiinnnn mmmmooooddddeeee oooonnnn////ooooffffffff
  120.                   As with many _G_L demos, there is a mode in which things
  121.                   happen ``by themselves'' without user intervention.  Turning
  122.                   _s_p_i_n _m_o_d_e on causes the room to continually follow the
  123.                   mouse, rotating in the mouse direction with a velocity
  124.                   proportional to the distance from the mouse position to the
  125.                   center of the _s_c_r_e_e_n (_n_o_t the model window).
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. NNNNEEEEWWWWTTTTOOOONNNN((((6666DDDD))))                                                          NNNNEEEEWWWWTTTTOOOONNNN((((6666DDDD))))
  137.  
  138.  
  139.  
  140.      eeeexxxxiiiitttt
  141.                   Quit _N_e_w_t_o_n. Other ways of quitting include hitting the
  142.                   ESCAPE key, and selecting qqqquuuuiiiitttt from the menu bar.
  143.  
  144.      SSSSLLLLIIIIDDDDEEEERRRRSSSS
  145.  
  146.      A _s_l_i_d_e_r is a means of changing the value of some physical parameter of
  147.      the system.  If the slider you need is not open already, you can open it
  148.      from the pppphhhhyyyyssssiiiiccccssss menu, as explained above.  A slider is essentially a
  149.      window that shows the lowest, highest, and current values of the
  150.      corresponding physical parameter:  the precise values appear in the lower
  151.      left, lower right, and lower middle of the slider window.  A visual
  152.      interpretation appears above the numbers as a rectangle that is
  153.      partitioned into a green and yellow sections, which correspond to the
  154.      portion of the range below and above the current value, respectively.
  155.  
  156.      Moving to any point within the graphic representation of the slider and
  157.      clicking the _l_e_f_t mouse button will make the value corresponding to that
  158.      point become the current value of the slider.  You can also slide the
  159.      value by using the _m_i_d_d_l_e mouse button in a manner analogous to rotating
  160.      the room (see above).  The _r_i_g_h_t mouse button brings up the slider menu,
  161.      which enables you to reset the slider to its default value, or close the
  162.      slider window altogether.  Once closed, a slider window can be reopened
  163.      from the pppphhhhyyyyssssiiiiccccssss menu.
  164.  
  165.      Available sliders are:
  166.  
  167.      GGGGrrrraaaavvvviiiittttyyyy        The magnitude of the gravity vector.  It always points
  168.                     down (in screen space).
  169.  
  170.      SSSSpppprrrriiiinnnngggg CCCCoooonnnnssssttttaaaannnntttt
  171.                     The spring constant of the stiffest spring in the model.
  172.  
  173.      WWWWaaaallllllll SSSSttttiiiiffffffffnnnneeeessssssss The walls of the room are like trampolines, and that is
  174.                     why the model bounces off of them.  This parameter
  175.                     controls the stiffness of those trampolines.  The higher
  176.                     the value, the harder the walls kick back.  The lower the
  177.                     value, the soggier the walls.  The latter results in the
  178.                     model ``sinking'' into the walls.
  179.  
  180.      WWWWaaaallllllll FFFFrrrriiiiccccttttiiiioooonnnn  When the model hits a wall, it typically loses some energy
  181.                     due to wall friction.  This parameter controls which
  182.                     fraction of the energy is lost.  The higher the friction,
  183.                     the more energy gets lost.  Note that with high friction
  184.                     the model often ``prefers'' ``jumping'' along a wall to
  185.                     ``sliding'' along it.
  186.  
  187.      AAAAiiiirrrr DDDDaaaammmmppppeeeennnniiiinnnngggg  This parameter controls how much energy the model loses
  188.                     simply by moving through the air that's inside the room.
  189.                     When this value is high, it is as if the model is
  190.                     surrounded by a viscos material (such as honey) rather
  191.                     than air.  When this value is zero, the model experiences
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. NNNNEEEEWWWWTTTTOOOONNNN((((6666DDDD))))                                                          NNNNEEEEWWWWTTTTOOOONNNN((((6666DDDD))))
  203.  
  204.  
  205.  
  206.                     no air resistance whatsoever.
  207.  
  208.      DDDDiiiissssppppllllaaaayyyy SSSStttteeeepppp   If you think of what you see on the screen as a movie,
  209.                     this parameter controls which frames actually get drawn.
  210.                     When the display step is 5, for example, only every fifth
  211.                     frame (roughly) of the movie gets displayed.  When the
  212.                     value is high, the animation is usually faster and
  213.                     jumpier.  When the value is low, the movie is more smooth,
  214.                     but has a feeling of slow motion.
  215.  
  216.      CCCCOOOOMMMMMMMMAAAANNNNDDDD LLLLIIIINNNNEEEE AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  217.  
  218.      The ----DDDD (demo-mode) option causes all the sliders to be opened (as well as
  219.      the main window) in pre-defined positions on the screen.  Specifiying
  220.      ``----ffff model_catalog'' causes the program to use an alternative list of
  221.      model shapes instead of the default ones.  The serious user may
  222.      experiment with new model shapes once she managed to decipher the obscure
  223.      format of a model description file...
  224.  
  225.      A model catalog is a list of model description file names.  If a name is
  226.      not fully-qualified, it is considered relative to the directory
  227.      containing the model catalog file.
  228.  
  229.      If the model_catalog is `-', it is taken to be the standard input.  For
  230.      example, to have _N_e_w_t_o_n run on all the ``*.j'' files in the current
  231.      working directory, you might use
  232.  
  233.           echo   *.j   |   newton   -f   -
  234.  
  235.      HHHHEEEELLLLPPPPFFFFUUUULLLL HHHHIIIINNNNTTTTSSSS
  236.  
  237.      There are many fun things to do with this program.  However, remember
  238.      that certain combinations of physical parameters may cause the model to
  239.      break - very much as in real life.  When the model breaks, there is no
  240.      need for panic: simply hit the left mouse button and you get a fresh
  241.      model that you can break again ...
  242.  
  243.      You can kick the model by tilting the room so the lowest point is a
  244.      corner.  Let the model come to a rest at that corner, and then rotate the
  245.      room around a horizontal axis - simply drag the mouse either up or down
  246.      rapidly with the middle mouse button pressed.  The decision whether to go
  247.      up or down depends on the position of the low corner: if it is more to
  248.      the front (facing you) - go up, if it is facing away from you - go down.
  249.      Kicking normally introduces gobs of energy into the system, and some
  250.      models do not handle that very well.  You may want to decrease wall
  251.      stiffness or increase spring constant before kicking.
  252.  
  253.      Another fun thing is to see soggy walls:  just push wall stiffness to a
  254.      very low value, and then drop the model.  This is particularly visible if
  255.      you align the room so that the bottom wall is almost flat, but still
  256.      faces you a little (if a wall faces away from you - it automatically
  257.      becomes transparent) prior to dropping the model.  When the model comes
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. NNNNEEEEWWWWTTTTOOOONNNN((((6666DDDD))))                                                          NNNNEEEEWWWWTTTTOOOONNNN((((6666DDDD))))
  269.  
  270.  
  271.  
  272.      to a rest, you may kick up the wall stiffnes (select the default wall
  273.      stiffness from the slider menu), and the model will soar to the sky as
  274.      fast as gravity and the air dampening enable.
  275.  
  276.      Once you have mastered the user interface to this program, try to get the
  277.      _c_h_a_i_n model to hang in free space by its two endpoints.  In other words,
  278.      get the room aligned so that there is an edge of the cube at the bottom,
  279.      and the two walls incident on that edge form a V-shaped corner.  Then
  280.      drop the model.  Wall friction and stiffness may help you overcome
  281.      inacuracies in the room alignment.  Once the model hangs there, you can
  282.      gradually lower and raise the spring constant, lower and raise gravity,
  283.      or kick the wall stiffness - all of which will show amusing effects on
  284.      the chain.
  285.  
  286.      These are but a few of the possible experiments that can be carried out
  287.      using this simulation.
  288.  
  289. FFFFIIIILLLLEEEESSSS
  290.      /usr/demos/General_Demos/newton/data         the default list of model
  291.      shapes
  292.      /usr/demos/General_Demos/newton/data/*.j     model description files
  293.  
  294. DDDDIIIIAAAAGGGGNNNNOOOOSSSSIIIITTTTIIIICCCCSSSS
  295.      Self explanatory.  Messages that appear on the terminal from which _N_e_w_t_o_n
  296.      was invoked indicate a problem _N_e_w_t_o_n is experiencing in performing the
  297.      simulation.  Typically, this indicates an incorrect setup of either the
  298.      _N_e_w_t_o_n program or the catalog or description files.
  299.  
  300. BBBBUUUUGGGGSSSS
  301.      The bending of the walls is approximated by a crude pyramid.  The _s_h_e_e_t
  302.      model particularly suffers from that, so you have to have relatively
  303.      stiff walls to get a decent performance out of the _s_h_e_e_t.
  304.  
  305. AAAAUUUUTTTTHHHHOOOORRRR
  306.      Yossi Friedman, June-August 1988.  The idea is derived from the original
  307.      ``Jello'' by Thant Tessman.
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.